import unittest,app,time
import HTMLTestRunner_PY3

from script.test_ZYY import TestBm
from script.test_dl import TestEmployeeParam
from script.test_employee import TestEmployee

suite = unittest.TestSuite()
# 3 将测试用例添加到测试套件
suite.addTest(unittest.makeSuite(TestBm))
# 4 初始化runner
with open(app.BASE_DIR + f'/report/report{time.strftime("%Y%m%d %H%M%S")}.html', 'wb') as f:
    runner = HTMLTestRunner_PY3.HTMLTestRunner(f)
    # 5 执行测试套件生成测试报告
    runner.run(suite)
